package cn.sunxyz.behavior.strategy;

/**
 * Created by yangrd on 2017/5/15.
 */
public class Client {
    public static void main(String[] args) {
        Strategy strategy1 = new ConcreteStrategyA();
        Strategy strategy2 = new ConcreteStrategyB();
        Context context = new Context(strategy1);
        context.algorithm();
        context.setStrategy(strategy2);
        context.algorithm();
    }
}
